package cc.comac.mom.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.EquipMaterialDataService;
import cc.comac.mom.bean.EquipMaterialData;
import cc.comac.mom.datahandlers.entity.EquipMaterialDataDataHandler;
import cc.comac.mom.util.ResultBean;
@Service
@RestController
public class EquipMaterialDataServiceImpl implements EquipMaterialDataService {
	@Autowired
	private EquipMaterialDataDataHandler equipMaterialDataDataHandler;
	
	@Override
	public ResultBean insertMaterialBatch(@RequestBody List<EquipMaterialData> materialList) {
		ResultBean resultBean = new ResultBean(true);
		int insert = equipMaterialDataDataHandler.insert(materialList);
		resultBean.setObject(insert);
		return resultBean;
	}

	@Override
	public EquipMaterialData selectAllByPage(@RequestBody EquipMaterialData equipMaterialData) {
		EquipMaterialData selectAllByPage = equipMaterialDataDataHandler.selectAllByPage(equipMaterialData);
		return selectAllByPage;
	}

}
